package hhm.javamode.decorator;

import hhm.javamode.base.adduser.UserServiceImpl;

public class Test {

	public static void main(String[] args) {
		UserServiceImpl userServiceImpl = new UserServiceImpl();

		// 使用普通的log来输出
		CommonLogDectrator commonLogDectrator = new CommonLogDectrator();
		commonLogDectrator.setUserServiceImpl(userServiceImpl);
		commonLogDectrator.log();

		// 使用log4j来输出
		Log4jDectrator log4jDectrator = new Log4jDectrator();
		log4jDectrator.setUserServiceImpl(userServiceImpl);
		log4jDectrator.log();
	}

}
